<?php

include 'lib/ofc/php-ofc-library/open-flash-chart.php';
include("recordmanager.php");

$animation_1= 'pop';
$delay_1    = 0;
$cascade_1    = 1;


$result=getStationOilWear();
$title = new title( "加油站纪录" );
$bar = new bar_glass();
$bar->set_values(array_values($result) );
$bar->set_on_show(new bar_on_show($animation_1, $cascade_1, $delay_1));

$chineseName=array();
foreach(array_keys($result) as $name){
    array_push($chineseName, getStationChineseName($name));
}


$x = new x_axis();
$x->set_labels_from_array($chineseName);


$chart = new open_flash_chart();
$chart->set_title( $title );
$chart->add_element( $bar );
$chart->set_x_axis( $x );
echo $chart->toString();

?>